import numpy as np
import os


def read_data(_path):
    train_data = np.loadtxt(os.path.join(_path, 'train', 'x.txt'))
    train_data.reshape(2, -1)
    train_label = np.loadtxt(os.path.join(_path, 'train', 'y.txt'))
    train_label.reshape(1, -1)
    test_data = np.loadtxt(os.path.join(_path, 'test', 'x.txt'))
    test_data.reshape(2, -1)
    test_label = np.loadtxt(os.path.join(_path, 'test', 'y.txt'))
    test_label.reshape(1, -1)
    return train_data, train_label, test_data, test_label


# train_x, train_y, test_x, test_y = read_data('Exam')
# print(train_x)
# print(train_y)
# print(test_x)
# print(test_y)
